<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCouponCodeTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //优惠券码
        Schema::create('coupon_code', function (Blueprint $table) {
            $table->increments('id')->comment('自增id');
            $table->string('code_value')->nullable()->comment('码值');
            $table->integer('is_use')->default(0)->comment('是否使用');
            $table->string('used_time')->nullable()->comment('使用时间');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
